package com.wuyb.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuyb.pojo.AdminLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * AdminLog持久层
 *
 * @Author: wyb
 * @Date: 2024/01/01/13:53
 * @Description:
 */
@Repository
public interface AdminLogMapper extends BaseMapper<AdminLog> {

    /**
     * 分页查询用户信息
     * @param page
     * @param customSqlSegment
     * @return
     */
    IPage<AdminLog> selectWithUser(Page<AdminLog> page, @Param("ew")Wrapper<AdminLog> customSqlSegment);


    /**
     * 通过用户的ID查询用户日志
     * @param userId
     * @return
     */
    AdminLog selectByUserId(@Param("userId") Integer userId);
}
